﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Sector7.Medical.EntityType;
using Sector7.Framework.Core;
using Sector7.Medical.Enums;

namespace Sector7.Medical.Services
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IStockService”。
    [ServiceContract]
    public interface IStockService
    {
        #region /// Stock

        /// <summary>
        /// 添加费用记录（该方法不是提供给客户端调用！！！）
        /// </summary>
        [OperationContract]
        int AddChargeRecord(long billId, DateTime recordTime, decimal amount, int deptId, int paymentType);

        /// <summary>
        /// 添加采购记录
        /// </summary>
        /// <param name="bill">采购单信息</param>
        /// <returns></returns>
        [OperationContract]
        int AddPurchasesBill(M7_PurchasesBill bill);

        /// <summary>
        /// 添加药房发药记录
        /// </summary>
        /// <param name="dispenseBill"></param>
        /// <returns></returns>
        [OperationContract]
        int AddDispenseBill(M7_DispenseBill dispenseBill);

        /// <summary>
        /// 根据关键字和药品属性获取药品列表
        /// </summary>
        /// <param name="keywords">关键字</param>
        /// <param name="properties">需要查询的属性</param>
        /// <returns></returns>
        [OperationContract]
        List<M7_Drug> GetDrugListByKeywordsAndProperties(string keywords, DrugPropertyType properties);

        /// <summary>
        /// 添加药品规格
        /// </summary>
        /// <param name="drugSpec"></param>
        /// <returns></returns>
        [OperationContract]
        long AddDrugSpec(M7_DrugSpec drugSpec);

        /// <summary>
        /// 根据关键字获取包含价格信息的药品列表
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<M7_Drug> GetDrugListWithPriceByKeywords(string keywords);

        /// <summary>
        /// 添加调价记录
        /// </summary>
        /// <param name="record"></param>
        /// <returns></returns>
        [OperationContract]
        int AddAdjustRecord(M7_AdjustRecord record);
        #endregion
    }
}
